package com.rjpacket.MyUEnjoy.adapters;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import com.rjpacket.MyUEnjoy.fragments.PhotoFragment;

/**
 * Created by aaa on 15-1-23.
 */
public class PhotoAdapter extends FragmentPagerAdapter {
    public PhotoAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        Fragment fragment = null;

        Bundle bundle = new Bundle();
        bundle.putInt("position",position);
        fragment = new PhotoFragment();
        fragment.setArguments(bundle);

        return fragment;
    }

    @Override
    public int getCount() {
        return 2;
    }
}
